package com.wn.ticket.service.impl;

import com.wn.ticket.entity.Coupon;
import com.wn.ticket.mapper.CouponMapper;
import com.wn.ticket.service.CouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CouponServiceImpl implements CouponService {

    @Autowired
    private CouponMapper couponMapper;

    @Override
    public void add(Coupon coupon) {
        couponMapper.insert(coupon);
    }

    @Override
    public void del(int id) {
        couponMapper.del(id);
    }

    @Override
    public List<Coupon> getAll() {
        return couponMapper.getAll();
    }

    @Override
    public List<Coupon> getByCondition(Coupon coupon) {
        return couponMapper.getByCondition(coupon);
    }


}
